package com.tang.script.variable;

import lombok.Getter;
import lombok.Setter;

@Getter
public enum VariablesType {
    number(0), string("");

    private final Object defaultValue;

    VariablesType(Object o) {
        this.defaultValue = o;
    }

    public static VariablesType of(String name) {
        for (VariablesType value : VariablesType.values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        throw new RuntimeException("不支持的类型: " + name);
    }
}
